package base.module.intrface;

import base.CGUI;
import base.CGraphics;
import base.module.CModule;


public class CSetDivider extends CModule {
	@Override
	public void Init() {
		int[] Array = { 1, 3, 4 };
		AssertParam( Array );
	}
	
	
	
	@Override
    public void Execute() {
		if( Param.length == 1 ) {
			CGraphics.CentralDivider = CGraphics.LoadImage( Param[ 0 ].ToString() );
		} else if( Param.length >= 3 || Param.length <= 4 ) {
			CGraphics.DividerFrame = CGraphics.SetFrame( Param[ 0 ].ToString(), Param[ 1 ].ToInt(), 0, Param[ 2 ].ToInt(), 0 );
			if( Param.length == 4 ) CGraphics.CentralDivider = CGraphics.LoadImage( Param[ 3 ].ToString() );
		}
		if( CGraphics.CentralDivider != null ) CGUI.WindowsMargin = CGraphics.CentralDivider.getHeight();
	}
}